package com.boot.admin.modules.sys.ai.model.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * AI角色VO
 *
 * @author 李飞洋
 * @date 2025/9/24
 */
@Data
@EqualsAndHashCode
@ToString
public class AiRoleVO implements Serializable {
    @Schema(description = "id")
    private String id;

    @Schema(description = "创建人")
    private String createdBy;

    @Schema(description = "创建时间")
    private LocalDateTime created;

    @Schema(description = "更新人")
    private String modifiedBy;

    @Schema(description = "更新时间")
    private LocalDateTime modified;

    @Schema(description = "角色名称")
    private String roleName;

    @Schema(description = "角色描述")
    private String roleDesc;

    @Schema(description = "系统提示词")
    private String systemPrompt;

    @Schema(description = "语音ID")
    private String voiceId;

    @Schema(description = "头像URL")
    private String avatarUrl;

    @Schema(description = "语音语言代码，如 en-US, zh-CN")
    private String languageCode;

    @Schema(description = "口音信息，如 British, American, Greek")
    private String accent;

    @Schema(description = "语音风格，如 narration, chat, dramatic")
    private String style;

    @Schema(description = "情绪，如 calm, excited, serious")
    private String emotion;

    @Schema(description = "音调调整，默认0，正数升高，负数降低")
    private Double pitch;

    @Schema(description = "语速调整，1.0为正常，>1更快，<1更慢")
    private Double speakingRate;

    @Schema(description = "声音稳定性(如ElevenLabs特有参数)")
    private Double stability;

    @Schema(description = "音色相似度(如ElevenLabs特有参数)")
    private Double similarityBoost;

    @Schema(description = "排序序号")
    private Integer sortOrder;

    @Schema(description = "是否启用")
    private Integer isEnabled;

    @Schema(description = "是否启用")
    public boolean isEnabled() {
        if (null == isEnabled) {
            return false;
        }
        return isEnabled == 1;
    }
}